﻿using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
public class QueryParameter
{
    //这个变量是通用变量，这个类的作用就是统一的容纳各个类型的变量
    private object _value;
    public QueryParameter(object val)
    {
        this._value = val;
    }

    public static explicit operator QueryParameter(string value)
    {
        return new QueryParameter(value);
    }

    public static implicit operator QueryParameter(bool value)
    {
        return new QueryParameter(value);
    }

    public static implicit operator QueryParameter(byte value)
    {
        return new QueryParameter(value);
    }

    public static implicit operator QueryParameter(DateTime value)
    {
        return new QueryParameter(value);
    }

    public static implicit operator QueryParameter(DBNull value)
    {
        return new QueryParameter(value);
    }

    public static implicit operator QueryParameter(decimal value)
    {
        return new QueryParameter(value);
    }

    public static implicit operator QueryParameter(double value)
    {
        return new QueryParameter(value);
    }

    public static implicit operator QueryParameter(Guid value)
    {
        return new QueryParameter(value);
    }

    public static implicit operator QueryParameter(short value)
    {
        return new QueryParameter(value);
    }

    public static implicit operator QueryParameter(int value)
    {
        return new QueryParameter(value);
    }

    public static implicit operator QueryParameter(long value)
    {
        return new QueryParameter(value);
    }

    public static implicit operator QueryParameter(float value)
    {
        return new QueryParameter(value);
    }

    public static implicit operator QueryParameter(byte[] value)
    {
        return new QueryParameter(value);
    }


    // Properties
    public object Value
    {
        get { return this._value; }
    }
}